﻿using System;
using DAL;
using DAL.Enums;
using NUnit.Framework;
using SimpComm;

namespace Bll
{
    public class Log_Adm_Service : BaseService<Log_Adm>
    {
        public MsgBox Insert(Log_Adm admUserLog)
        {
            return base.Insert(admUserLog, p => { p.AddDate = DateTime.Now; });
        }
    }

#if DEBUG
    [TestFixture]
    public class TestAdmUserLogService
    {

        public Log_Adm_Service AdmUserLogService
        {
            get
            {
                throw new System.NotImplementedException();
            }
            set
            {
            }
        }
    
        [Test]
        public void Test_Insert()
        {
            //var admUserService = new AdmUserService();
            ////取值
            //var data = admUserService.GetEntity(p => p.ID == 1);
            //var _old = data.Security_LoginPwd;
            //var _new = Randoms.GetRandomPureChar(8);
            //Assert.IsTrue(admUserService.ChangePassword(1, new AdmUserRequest()
            //                                     {
            //                                         OldPassord = _old,
            //                                         NewPassword = _new
            //                                     }));
            //data = admUserService.GetEntity(p => p.ID == 1);
            //Assert.AreEqual(data.Security_LoginPwd, _new);
        }
    }
#endif
}